#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;



string Add(string a, string b){
    if(a.size() < b.size()){
        swap(a, b);
    }

    int lenDiff = a.size() - b.size();
    for(int i=0; i<lenDiff; i++){
        b.insert(b.begin(), '0');
    }

    string result(a.size()+1, '0');
    int carry = 0;
    for(int i=a.size() -1; i>=0; i--){
        int sum = (a[i] - '0') + (b[i] - '0') + carry;
        carry = sum / 10;
        result[i+1] = sum % 10 + '0';
    }

    result[0] = carry + '0';
    if(result[0] == '0'){
        return result.substr(1);
    }

    return result;
 }




string F(int N, vector<string>& cache){
    if(N == 1){
        return "1";
    }

    if (N == 2){
        return "2";
    }

    if (cache[N] != "-1") {
        return cache[N];
    }

    string res = Add(F(N-1, cache), F(N-2, cache));
    cache[N] = res;
    return res;
}


/**
 * https://www.luogu.com.cn/problem/P1255
 * 
 * 高精度
 */
int main() {
    int N;
    cin >> N;

    vector<string> cache(N+1, "-1");
    cache[1] = "1";
    cache[2] = "2";
    
    cout << F(N, cache) << endl;

    return 0;
}
